package com.yqd.lesson.actor.one

import akka.actor.{Actor, ActorLogging, Props}

object Receiver {
  def props: Props = Props[Receiver]
  final case class Greeting(greeting: String)
}

class Receiver extends Actor with ActorLogging {
  import Receiver._

  def receive = {
    case Greeting(greeting) =>
      log.info(s"${sender().path} say: $greeting")
  }
}
